#ifndef SHM_SERVER_H_
#define SHM_SERVER_H_

#include "../databaseADT/databaseADT.h"
#include "../../common/include/commonSHM.h"

void readCommandsSM(void);
int mainSM (void);
int canCommittSM(char * msg);
void *waitPckSM (void *ptr);
void fstconnSM(char * priv);
int addnameSM(char * name, int privKey);
void listdirsSM(char *priv, int shmKey);
void adddirSM (char * dir, char * priv, int shmKey);
void removedirSM(char * dir, char * priv, int shmKey);
void closesessSM(char * priv);
void rcvCommitSM (char * params, char * priv, int privKey);
void salirSM(char * param);
void getparamSM (char * full, char * params, char * priv);
int srv_commitSM(shmADT s, char * path, int type);
void *listenPubSM(void *parmsLC);

void endCiclesSM(int signo);
void sighandLCSM(int signo);
void closeALLSM(void);

#endif
